1. Field of the Invention
The present invention relates to an image coding apparatus for compressing and encoding image data, a program for controlling a computer to cause it to act as the image coding apparatus, a storage medium storing the program therein, and an image coding method for compressing and encoding image data.
2. Description of the Related Art
Recently, demand for compressing/decompressing techniques by which high-definition image data can be easily handled has increased. The so-called JPEG2000 technology is known as one compressing technology satisfying this demand, by which a high-quality image can be obtained from decoding image data, even image data once compressed at a high compression rate.
According to the JPEG2000 architecture, rate control is performed for the purpose of obtaining a predetermined code amount. In other words, codes are generated after so-called truncation processing, and then, the codes are reduced as a result of bit planes in a sub-band being discarded, plane by plane, according to a request to reduce the code amount, in an optimum order to avoid degradation in the image quality. However, in such a manner, a problematic situation may occur in which the code amount that is obtained becomes much smaller than expected.
In order to solve such a problem, Japanese Laid-open Patent Application No. 2002-34043 discloses a technology in which a predetermined code amount is obtained with the use of dummy data for achieving fine adjustment in the code amount.
Furthermore, a Lagrange's rate control method is known also for achieving fine adjustment of the code amount.
In the above-mentioned technique disclosed by Japanese Laid-open Patent Application No. 2002-34043, as mentioned above, a predetermined code amount is obtained by use of fine adjustment with the use of dummy data added thereto. However, in this case, the obtained image quality is not improved from that which existed before the dummy data is added.
According to the Lagrange's rate control method, it is necessary to apply a much smaller value as a unit value with which a code amount is controlled/adjusted when fine adjustment is performed. Therefore, considerable time may be taken for the processing, and also, the processing may become complicated accordingly.